<?php @session_start();  ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thời Khoá Biểu</title>
<script src="../../js/jquery-1.10.0.js">
</script>
</head>

<body>
<?php
include ("../../app/connection.php");
?>
<center>
<form action="viewTKB.php" method="get">
<label for="semeter">Chọn Học Kỳ : </label>
<select name="semeter" id="semeter">
<?php
$semeter = mysql_query("select distinct HOCKY from LOP");
while($row = mysql_fetch_array($semeter))
{
	echo "<option value='".$row[0]."'>".$row[0]."</option>";
}
$year = mysql_query("select distinct NAM from LOP");

?>
</select>

<label for="year">Chọn Năm: </label>
<select name="year" id="year">
<?php
$year = mysql_query("select distinct NAM from LOP");
while($row = mysql_fetch_array($year))
{
	echo "<option value='".$row[0]."'>".$row[0]."</option>";
}
?>
</select>
<?php
<<<<<<< .mine
echo "<input type='hidden' id='userID' value='".$_SESSION['s_user']."'>";
=======
echo "<input type='hidden' id='userID' value='".$_SESSION["s_user"]."'>";
>>>>>>> .r77
?>
<br />
<br />
<img src="" />
<br />
<br />
<input type="button" value="Xem" />
<br />
<br />
<div id="TKB" style="width:100%">
</div>
</form>
<script>
$(document).ready(function(e){
	$("input[value=Xem]").click(function(){
		$("img").attr("src","../../image/source/loading.gif");
		$.ajax({
		url:"viewTKB.php",
		data:{semeter:$("#semeter").val(),year:$("#year").val(),id:$("#userID").val()}	
		}).done(function(msg){
			$("#TKB").html(msg);
			$("img").attr("src","");
		});
	});
    
});
</script>
</center>
</body>
</html>